import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";

type homeResult = {
  page: any;
  result: any
};

/** 数据统计 */
export const gettjinfo = () => {
  return http.request<homeResult>("get", baseUrlApi(`/api/backend/homepage/gettjinfo`));
};



/** 管理员列表 */
export const getSelpage = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/api/backend/authregister/selpage"), { data });
};


/** 新增管理员账号 */
export const addauth = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/api/backend/authregister/addauth"), { data });
};


/** 更新管理员账号 */
export const updateauth = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/api/backend/authregister/updateauth"), { data });
};

/** 删除管理员账号 */
export const delinfo = (userid?: string | number) => {
  return http.request<homeResult>("delete", baseUrlApi(`/api/backend/authregister/delinfo/${userid}`));
};